From: Daniel De Graaf Date: Fri, 11 Apr 2014 09:20:08 +0000 (+0200) Subject: prevent 0 from being used as a dynamic domid X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5223 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=920641d9c4a9216952c2200cd4a10938ec90e0f0;p=xen.git prevent 0 from being used as a dynamic domid When the hardware domain is made distinct from dom0, it becomes possible to shut down and destroy domain 0 while leaving the hypervisor running. If this happens, prevent this domain ID from being considered for allocation to a new guest. Signed-off-by: Daniel De Graaf Acked-by: Keir Fraser --- diff --git a/xen/common/domctl.c b/xen/common/domctl.c index 5e807abef7..af3614b54f 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -436,7 +436,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) for ( dom = rover + 1; dom != rover; dom++ ) { if ( dom == DOMID_FIRST_RESERVED ) - dom = 0; + dom = 1; if ( is_free_domid(dom) ) break; }